'''
@author: haiwen
@date: 2020/9/27
@file: conftest.py
'''

#初始化合同分类--销售合同
import pytest

from pylib.webapi.business import ContractTypesAPI

@pytest.fixture(scope='package')
def init_contract_type(init_accounts):
    accounts_api=init_accounts[0]
    accounts=init_accounts[1]
    #创建合同分类-销售合同
    ct_api=ContractTypesAPI(accounts_api.cookies)
    ct=ct_api.add(name='销售合同',code='2020-9-27')
    yield ct_api,ct
    ct_api.delete(ct['_id'])

